/*
 *
 */

#ifndef BB_BUFFER_H
#define BB_BUFFER_H

#include "gkt_types.h"

#ifdef __cplusplus
extern "C" {
#endif

#ifdef GKT_CONFIG_BB_BUFFER_USE_SYSTEM
#define BB_BUFFER_USE_SYSTEM	GKT_CONFIG_BB_BUFFER_USE_SYSTEM
#else
#define BB_BUFFER_USE_SYSTEM	0
#endif

#if BB_BUFFER_USE_SYSTEM
#include "gkt_malloc.h"

#define bb_buffer_alloc(size)	(uint8_t *)gkt_malloc(size)
#define bb_buffer_free(buffer)	gkt_free(buffer)
#define bb_buffer_init()	do {} while (0)
#else
uint8_t *bb_buffer_alloc(uint32_t size);
void bb_buffer_free(uint8_t *buffer);
int bb_buffer_init(void);
#endif

#ifdef __cplusplus
}
#endif

#endif	/* GKT_BUFFER_H */

